
function getStaticData(actor: any): testFuncData | null {
    let varData = LActor.getStaticData(actor);
    if (!varData) return null;
    varData.testFuncData = {
        age: 10,
        sex: "male",
        score: 100,
        tdata:{
            type: 10,
            value: 10,
            array_info: [1, 2, 3]
        } as testData
    } as testFuncData;
    return varData.testFuncData;
}

function checkIsOpen(actor: any): boolean {
    return true;
}

function OnLoginEvent(actor: any): void {
    if(null == actor) return;
    if(!checkIsOpen(actor)) return;

    const varData = getStaticData(actor);
    if (null == varData) return;
    if(varData.sex == "male"){
        print(varData.age+" "+varData.sex+" "+varData.score);
    }
}

function OnLogoutEvent(actor: any): void {
    if(null == actor) return;
    if(!checkIsOpen(actor)) return;
}

export function OnInitFunction(){
    OnLoginEvent(null);
}